﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.Unity;
using Microsoft.Practices.Prism.Regions;
using ShellInfrastructure;
using ModuleProductDetail.Views;
using ModuleProductDetail.ViewModels;

namespace ModuleProductDetail
{
    public class ProductDetailModule : ModulesInfrastructure.SharedModule
    {
        protected override void RegisterViewsInRegions()
        {
            RegionManager.RegisterViewWithRegion(RegionNames.RightRegionName, () => UnityContainer.Resolve<IProductDetailView>());
           // RegionManager.RegisterViewWithRegion(RegionNames.LeftRegionName, () => UnityContainer.Resolve<IProductDetailView>());  
        }

        protected override void RegisterTypesDependencies()
        {
            UnityContainer.RegisterType<IProductDetailView, ProductDetailView>(new ContainerControlledLifetimeManager());
            UnityContainer.RegisterType<IProductDetailViewModel, ProductDetailViewModel>(new ContainerControlledLifetimeManager());
            UnityContainer.RegisterType<IProductDetailView, ProductDetailView>(new ContainerControlledLifetimeManager());
            UnityContainer.RegisterType<IProductDetailViewModel, ProductDetailViewModel>(new ContainerControlledLifetimeManager());
      
        }
    }
}
